package aiingames.simulation.gui;

import java.awt.Color;
import java.awt.Graphics;



public class Agent {
 
    private int radius = 0;
    private Color color;
	private int y;
	private int x;
	private int dx;
	private int dy;
    
    public Agent(Color color) {
		this.color = color;
	}


	public void paintAgent(Graphics g) {
    	g.setColor(this.color);
    	g.fillOval(this.x-this.radius, this.y-this.radius, 2*this.radius, 2*this.radius);
    	g.setColor(Color.BLACK);
    	g.drawLine(this.x, this.y, this.x + this.dx, this.y + this.dy);
    }

    
    public void setRadius(int d) {
    	this.radius = d;
		//System.out.println("radius agent " + radius);
    }


	public void setLocation(int x, int y) {
		this.x = x;
		this.y = y;
		
	}
	
	public void setDirection(int dx, int dy) {
		this.dx = dx;
		this.dy = dy;
	}
}
